package cn.com.server.service;

import java.sql.SQLDataException;
import java.util.List;

import com.github.pagehelper.Page;

import cn.com.server.entity.Role;
import cn.com.server.extend.model.RoleEntityModel;
import cn.com.server.extend.model.RoleModel;
import cn.com.server.extend.view.RoleView;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author qing
 * @since 2017-11-20
 */
public interface RoleService{
	
	public List<Role> selectByUserId(Long id);

	List<Role> selectByGroupId(Long groupId);

	Page<RoleView> selectRoleViewList(RoleModel model);

	int insert(Role entity);

	int update(Role entity);

	int insertRoleAndRoleGroup(RoleEntityModel model);

	int updateRoleAndRoleGroup(RoleEntityModel model);

	int deleteRoleAndAllByRoleIds(String ids) throws SQLDataException;
}
